package com.yjhb.android.sbz.v2.mvp.presenter

import com.yjhb.android.sbz.http.HttpObserver
import com.yjhb.android.sbz.http.HttpTool
import com.yjhb.android.sbz.v2.mvp.V2ConventionPresenter
import com.yjhb.android.sbz.v2.mvp.view.InvitationView


/**
 *  创建者 zx
 *  创建时间 2021/5/19 14:58
 */
class InvitationPresenter(view: InvitationView) : V2ConventionPresenter<InvitationView>(view) {

    fun newUserReward() {
        model?.let {
            HttpTool.request(it.newUserReward(), object : HttpObserver<Long>() {
                override fun onResult(data: Long?) {
                    view?.onSuccess(data != null)
                }

                override fun onError(code: Int, msg: String?) {
                    view?.onFailure(code, msg)
                }
            })
        }
    }

}